package com.gjun.struts.resource;

import java.util.List;

import com.gjun.struts.bean.GjunsystemPrivilege;
import com.gjun.struts.bean.GjunsystemUser;
import com.gjun.struts.bean.GjunsystemUserJsonBean;
import com.gjun.struts.bean.GjunsystemUserJsonBean2;

public interface GjunSystemUserResourceIf {
	GjunsystemUser loadLoginAdmin(String name, String passwd) throws Exception;

	public List<GjunsystemPrivilege> loadUserPrivilegesByUserId(int userid);

	public void saveSystemUser(GjunsystemUser user, String[] roles)
			throws Exception;

	public boolean updateSystemUserState(String username, String code)
			throws Exception;

	public List<GjunsystemUserJsonBean> loadAllUsersToJsonBean();

	public boolean loadUserExistByName(String name);

	public boolean loadExistByEmail(String email);

	public boolean loadOtherUserExistEmail(String email, int id);

	public void updateSystemUserInfo(int id, String passwd, String tel,
			String qq, String email) throws Exception;
	
	
	public List<GjunsystemUserJsonBean2> loadUserByConditionForName(String username,int start,int max);
	
	public int loadUserCountByConditionForName(String username);
}
